<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        body {
            position: absolute;
            background: #ccc;
            height:3000px;
        }

        .div2 {
            position: fixed;
            width: 1.172058134083451rem;
            height: 50px;
            background: #fff;
        }
    </style>
    <script type="text/javascript" charset="utf-8" src="./jquery.js"></script>
    <script>
        (function ($) {
            $.fn.extend({
                AutoSize: function () {
                    var element = $(this);
                    auto();

                    function auto() {
                        var width = $(window).width(),
                            height = $(window).height();
                        $("html").css("font-size", width / 15);
                        $(element).width(width);
                    };
                    $(window).resize(auto);
                }
            });
        })(jQuery);
    </script>

    <script>
        $(function () {
            $("body").AutoSize();
        })
    </script>

    <script>
        $(function () {
            var isdrag = false;
            var NowLeft, disX;
            var NowTop, disY;

            var oDiv2 = document.getElementById("div2");

            oDiv2.addEventListener('touchstart', thismousedown);
            oDiv2.addEventListener('touchend', thismouseup);
            oDiv2.addEventListener('touchmove', thismousemove);

            function thismousedown(e) {
                isdrag = true;
                NowLeft = parseInt(oDiv2.style.left + 0);
                NowTop = parseInt(oDiv2.style.top + 0);
                disX = e.touches[0].pageX;
                disY = e.touches[0].pageY;
                return false;
            }

            function thismousemove(e) {
                if (isdrag) {

                    oDiv2.style.left = NowLeft + e.touches[0].pageX - disX + 'px';
                    oDiv2.style.top = NowTop + e.touches[0].pageY - disY + 'px';

                    return false;
                }
            }

            function thismouseup() {
                isdrag = false;
            };
        });
    </script>
</head>

<body>
    <div id="div2" class="div2"></div>
</body>

</html>